package com.zj.study;

import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

@Component
public class MyApplicationListener {

    @EventListener(classes = MyApplicationEvent.class)
    public String doApplicationListener(MyApplicationEvent event){
        System.out.println(event.getSource()+":source in MyApplicationEvent:"+Thread.currentThread().getName());
        return "hehe";
    }
}
